package com.rgp.serviceorder.feign;

import com.rgp.internalcommon.dto.ResponseResult;
import com.rgp.internalcommon.response.DriverCarResponse;
import com.rgp.internalcommon.response.DriverInfoResponse;
import com.rgp.internalcommon.response.DriverStatusResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;

/**
 * @author nhp
 * @version 1.0
 * @description TODO
 * @date 2024-04-23 22:49
 */
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @GetMapping("/drivers/{cityCode}/{state}")
    public ResponseResult<Boolean> judgeIfExistAvailableDrivers(@PathVariable("cityCode")String cityCode, @PathVariable("state") Integer state);

    @PostMapping("/drivers/by-carIds")
    public ResponseResult<List<DriverCarResponse>> getDriversByCarIds(@RequestBody List<String> carIds);

    @GetMapping("/drivers/{driverId}")
    public ResponseResult<DriverInfoResponse> getDriverInfoByDriverId(@PathVariable("driverId") Long driverId);

    @PostMapping("/get-driver-status/by-ids")
    public ResponseResult<DriverStatusResponse> getStatusByDriverIds(@RequestBody List<Long> driverIds);

    @GetMapping("car/{id}")
    public ResponseResult selectCarById(@PathVariable("id") Long id);

}